package com.yang.booking.controller;

import com.yang.booking.service.BiweeklyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class BiweeklyController {

    @Autowired
    private BiweeklyService biweeklyService;

    @PostMapping("/provider/biweekly/insertBiweekly")
    public Map<String, Object> insertBiweekly(@RequestParam(name = "name") String name,
                                                     @RequestParam(name = "type") String type
    ){
        return biweeklyService.insertBiweekly(name, Integer.parseInt(type));
    }
}
